<%@page import="com.shop.domain.User"%>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8" contentType="text/html; charset=utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>猴子校园二手街-商品搜索</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	
	<link rel="stylesheet" href="<%=basePath%>css/style.css" type="text/css">
	<link rel="stylesheet" href="<%=basePath%>css/searchGoods.css" type="text/css">
	
  </head>
  
  <body>
    <div id="top">
    	<ul class="inTop clearfix">
        <li class="fl shoucang"><a href="#">收藏本站</a></li>
        <li class="fl" id="guanzhu">
            <a class="wxFocus" href="#">关注我</a>
            <div class="weiCode" style="display: none;">
                <span></span>
            </div>
        </li>
        
        <li class="fr"><a href="http://www.taoertao.com/about.php?part=faq" target="_blank">客户服务</a></li>
        <li class="fr"><a href="">消息中心</a></li>
        <li class="fr"><a href="">购物车</a></li>
        <li class="fr"><a href="jsp/certify.jsp">实名认证</a></li>
        <%
        	String username = ((User)session.getAttribute("currentUser")).getUsername();
        	if(username == null || username.length() == 0 || username.equals("")){	
         %>
         	<li>
         		 <a href="jsp/regist.jsp">注册</a>
         		 <a href="jsp/login.jsp"><strong>登录</strong></a>
         	</li>
        <%
      		} else{
       	%> 
       	
	        <li class="fr">您好，<%=username%>&nbsp;
	        	<a href="">已买到的宝贝</a>
	        	<a href="">已出售的商品</a>
	        	<a href="">出售中的商品</a>
	        	<a href="">收藏夹</a>
	        </li> 
	    <%
       		}
        %>    
	        
    </ul>
	</div>
	
	<div id="header">
	<div class="inHeader clearfix">
        <div class="midHeader clearfix">
        	<div class="logo fl">
            	<a href="user/index.do"><img src="images/logo.gif" title="猴子商城"></a>
            </div>
            <div class="searchArea fl">
            	<form method="get" action="goods/search.do" target="_blank">
                	<input type="text" name="keyword" class="keyword fl" placeholder="搜索你想要的宝贝">
                    <input type="submit" class="seaBtn fr" value="搜索">
                </form>
                <ul class="clearfix">
                	<li>热门搜索：</li>
                    <li><a href="#">自行车</a></li>
                    <li><a href="#">笔记本</a></li>
                    <li><a href="#">考研资料</a></li>
                    <li><a href="#">手机</a></li>
					<div style="display: inline-block; width: 380px; height: 22px; overflow: hidden; margin-top: 1px;">
					</div>
                </ul>
            </div>	    	
	   </div>
	</div>
	</div>

	<div class="body1000">
	<div class="wrapper">
		<div id="select">
			<dl>
				<dt>新旧程度</dt>
				<dd>
					<div>
						<a href="" class="curr">不限</a>
					</div>
					<div>
						<a href="goods/condition.do?param=degree_10">全新</a>
					</div>
					<div>
						<a href="goods/condition.do?param=degree_9">9成新</a>
					</div>
					<div>
						<a href="goods/condition.do?param=degree_8">8成新</a>
					</div>
					<div>
						<a href="goods/condition.do?param=degree_7">7成新</a>
					</div>
					<div>
						<a href="goods/condition.do?param=degree_6">6成新以下</a>
					</div>
				</dd>
			</dl>
			<dl>
				<dt>价格区间</dt>
				<dd>
				<div>
					<a href=""  class="curr">不限</a>
				</div>
				<div>
					<a href="goods/condition.do?param=price_asc">价格从低到高</a>
				</div>
				<div>
					<a href="goods/condition.do?param=price_desc">价格从高到低</a>
				</div>
				<div>
				    <form action="goods/condition.do?param=price_between" method="get">
				    	 <input type="hidden" name="param" value="price_between">
						<input type="text" name="low" class="keyword fl" placeholder="￥">
						<input type="text" name="high" class="keyword fl" placeholder="￥">
	                    <input type="submit" class="seaBtn fr" value="确定">
                    </form>
				</div>
				</dd>
			</dl>
			
			<dl>
				<dt>其他</dt>
				<dd>
					<div>
						<a href="goods/condition.do?param=hot">人气热门</a>
					</div>
					<div>
						<a href="goods/condition.do?param=recent">最新上架</a>
					</div>
					<div>
						<a href="goods/condition.do?param=online">在线交易</a>
					</div>
					<div>
						<a href="goods/condition.do?param=offline">线下交易</a>
					</div>
				</dd>
			</dl>
		</div>
	</div>

	<div class="item-list">
		<ul class="items clearfix">
			<c:forEach items="${goodsList }" var="goods">
				<li class="item">
					<a href="goods/detail.do?id=${goods.getId() }" class="img" target="_blank">
					<img src="goodsImage/${goods.getId() }${goods.getSeller() }0.jpg"	alt="${goods.getName() }"></a>
				<div class="info">
					<div class="price">${goods.getPrice() }</div>
					<div class="name">
						<a href="goods/deatil.do?id=${goods.getId() }" target="_blank">${goods.getName() }</a>
					</div>
					<div class="seller">
						<span>${goods.getSeller() }</span>
					</div>
					<div class="place">
						<span>
							<c:if test="${empty goods.getTransactionAddress() }">在线交易</c:if>
							<c:if test="${!empty goods.getTransactionAddress() }">${goods.getTransactionAddress() }</c:if>
						</span>
					</div>
				</div></li>
			</c:forEach>
			

			<li class="item fixed"></li>
			<li class="item fixed"></li>
			<li class="item fixed"></li>
		</ul>
	</div>
	</div>

	<script type="text/javascript" src="<%=basePath%>/js/jquery-1.11.2.min.js"></script>
	<script type="text/javascript" src="<%=basePath%>/js/common.js"></script>
	<script type="text/javascript" src="<%=basePath%>/js/index.js"></script>
</body>
</html>
